package com.ruoyi.pyo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pyo.mapper.PetYeahHallContentMapper;
import com.ruoyi.pyo.domain.PetYeahHallContent;
import com.ruoyi.pyo.service.IPetYeahHallContentService;

/**
 * 宠物讲堂内容中心Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-19
 */
@Service
public class PetYeahHallContentServiceImpl implements IPetYeahHallContentService 
{
    @Autowired
    private PetYeahHallContentMapper petYeahHallContentMapper;

    /**
     * 查询宠物讲堂内容中心
     * 
     * @param id 宠物讲堂内容中心主键
     * @return 宠物讲堂内容中心
     */
    @Override
    public PetYeahHallContent selectPetYeahHallContentById(Long id)
    {
        return petYeahHallContentMapper.selectPetYeahHallContentById(id);
    }

    /**
     * 查询宠物讲堂内容中心列表
     * 
     * @param petYeahHallContent 宠物讲堂内容中心
     * @return 宠物讲堂内容中心
     */
    @Override
    public List<PetYeahHallContent> selectPetYeahHallContentList(PetYeahHallContent petYeahHallContent)
    {
        return petYeahHallContentMapper.selectPetYeahHallContentList(petYeahHallContent);
    }

    /**
     * 新增宠物讲堂内容中心
     * 
     * @param petYeahHallContent 宠物讲堂内容中心
     * @return 结果
     */
    @Override
    public int insertPetYeahHallContent(PetYeahHallContent petYeahHallContent)
    {
        petYeahHallContent.setCreateTime(DateUtils.getNowDate());
        return petYeahHallContentMapper.insertPetYeahHallContent(petYeahHallContent);
    }

    /**
     * 修改宠物讲堂内容中心
     * 
     * @param petYeahHallContent 宠物讲堂内容中心
     * @return 结果
     */
    @Override
    public int updatePetYeahHallContent(PetYeahHallContent petYeahHallContent)
    {
        petYeahHallContent.setUpdateTime(DateUtils.getNowDate());
        return petYeahHallContentMapper.updatePetYeahHallContent(petYeahHallContent);
    }

    /**
     * 批量删除宠物讲堂内容中心
     * 
     * @param ids 需要删除的宠物讲堂内容中心主键
     * @return 结果
     */
    @Override
    public int deletePetYeahHallContentByIds(Long[] ids)
    {
        return petYeahHallContentMapper.deletePetYeahHallContentByIds(ids);
    }

    /**
     * 删除宠物讲堂内容中心信息
     * 
     * @param id 宠物讲堂内容中心主键
     * @return 结果
     */
    @Override
    public int deletePetYeahHallContentById(Long id)
    {
        return petYeahHallContentMapper.deletePetYeahHallContentById(id);
    }
}
